<?php

/**
 * 
 */
App::uses('AppModel', 'Model');

class Comments extends AppModel {

    public $name = 'Comments';
    public $findMethods = array('available' => true);

    protected function _findAvailable($state, $query, $results = array()) {
        if ($state === 'before') {
            $query['conditions']['Comments.valid'] = $query['valid'];
            return $query;
        }
        return $results;
    }

}